package com.atguigu.gmall.order.biz;

import com.atguigu.gmall.mq.ware.WareStockResultMsg;
import com.atguigu.gmall.order.entity.OrderInfo;
import com.atguigu.gmall.order.vo.OrderConfirmRespVo;
import com.atguigu.gmall.order.vo.OrderSplitResp;
import com.atguigu.gmall.order.vo.OrderSubmitVo;

import java.util.List;

//业务逻辑
public interface OrderBizService {
    //获取订单确认数据
    OrderConfirmRespVo orderConfirmData();

    //提交订单
    Long submitOrder(String tradeNo, OrderSubmitVo orderSubmitVo);

    //关单操作
    void closeOrder(Long id, Long userId);

    //根据userId和交易号修改订单状态为已支付状态
    void payedOrder(String out_trade_no, Long userId);

    //修改订单状态
    void updateOrderStockStatus(WareStockResultMsg resultMsg);

    //拆单
    List<OrderSplitResp> orderSplit(Long orderId, String json);

    //保存秒杀单
    Long saveSeckillOrder(OrderInfo orderInfo);
}
